package com.weayer.service;

import com.weayer.dto.Car;
import com.weayer.dto.DriverCarBindingRelationship;
import com.weayer.dto.DriverUser;
import com.weayer.dto.ResponseResult;
import com.weayer.remote.ServiceDriverUserClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description: Api服务 - BOSS - 司机以及车辆管理Service
 * @author: Weayer
 **/
@Service
public class DriverUserService {
    @Autowired
    private ServiceDriverUserClient serviceDriverUserClient;

    /**
     * @Description: 添加司机
     * @Param: [driverUser]
     * @return: com.weayer.dto.ResponseResult
     **/
    public ResponseResult addDriverUser(DriverUser driverUser){
        return serviceDriverUserClient.addUser(driverUser);
    }
    /**
     * @Description: 修改司机信息
     * @Param: [driverUser]
     * @return: com.weayer.dto.ResponseResult
     **/
    public ResponseResult updateDriverUser(DriverUser driverUser){
        return serviceDriverUserClient.updateUser(driverUser);
    }
    /**
     * @Description: 添加车辆
     * @Param: [car]
     * @return: com.weayer.dto.ResponseResult
     **/
    public ResponseResult addCar(Car car){
        return serviceDriverUserClient.addCar(car);
    }
    /**
     * @Description: 修改车辆信息
     * @Param: [car]
     * @return: com.weayer.dto.ResponseResult
     **/
    public ResponseResult updateCar(Car car){
        return serviceDriverUserClient.updateCar(car);
    }
    /**
     * @Description: 司机车辆关系绑定
     * @Param: [driverCarBindingRelationship]
     * @return: com.weayer.dto.ResponseResult
     **/
    public ResponseResult bind(DriverCarBindingRelationship driverCarBindingRelationship){
        return serviceDriverUserClient.bind(driverCarBindingRelationship);
    }
    /**
     * @Description: 司机车辆关系解绑
     * @Param: [driverCarBindingRelationship]
     * @return: com.weayer.dto.ResponseResult
     **/
    public ResponseResult unbind(DriverCarBindingRelationship driverCarBindingRelationship){
        return serviceDriverUserClient.unbind(driverCarBindingRelationship);
    }
}
